package com.app.twth.ui.mine.version;


import com.app.twth.app.Constant;
import com.app.twth.base.BaseModel;
import com.app.twth.bean.BaseResponseEntity;
import com.app.twth.net.JsonCallBack;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.FileCallback;

import java.io.File;

public class VersionDataModel extends BaseModel {
    public <T> void getNewAppInfo(JsonCallBack jsonCallBack) {
        OkGo.<BaseResponseEntity<T>>get(Constant.getNewAppInfo)
                .tag(this)
                .execute(jsonCallBack);
    }

    public void getApk(String url, FileCallback jsonCallBack) {
        OkGo.<File>get(url)
                .tag(this)
                .execute(jsonCallBack);
    }

}